package edu.spec.student.model.mental;

import javax.persistence.*;
import java.util.Date;

/**
 * 某次心理测试
 */
@Entity
@Table(name = "t_exam")
public class Exam {
    // 主键
    private Integer id;
    // 测试名称
    private String title;
    // 心理测验的POJO
    private Mental mental;
    // mental的pojo名称
    private String mentalName;
    // 完成时间
    private Date closeDate;
    // 说明
    private String description;
    // 创建时间
    private Date createDate;

    public Exam() {
    }

    @Id
    @GeneratedValue
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    @ManyToOne
    @JoinColumn(name = "mental_id")
    public Mental getMental() {
        return mental;
    }

    public void setMental(Mental mental) {
        this.mental = mental;
    }

    @Column(name = "mental_name")
    public String getMentalName() {
        return mentalName;
    }

    public void setMentalName(String mentalName) {
        this.mentalName = mentalName;
    }

    @Column(name = "close_date")
    public Date getCloseDate() {
        return closeDate;
    }

    public void setCloseDate(Date closeDate) {
        this.closeDate = closeDate;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Column(name = "create_date")
    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }
}
